<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<h1>jQuery入口函数与onload的区别</h1>
<script>

    window.onload = function () {
        alert('我是window onload1');
    }
    window.onload = function () {
        alert('我是window onload2');
    }

    $(function () {
        alert("我是窗口1");
    })

    $(function () {
        alert("我是窗口2");
    })

</script>
</body>
</html>
